home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
newsgroups
/
misc.19950528-19950726
/
000082_news@columbia.edu_Wed Jun 7 03:29:27 1995.msg
< prev
next >
Wrap
Internet Message Format
|
1995-07-31
|
3KB
Received: from apakabar.cc.columbia.edu by watsun.cc.columbia.edu with SMTP id AA20986
(5.65c+CU/IDA-1.4.4/HLK for <kermit.misc@watsun.cc.columbia.edu>); Wed, 7 Jun 1995 22:29:40 -0400
Received: by apakabar.cc.columbia.edu id AA06323
(5.65c+CU/IDA-1.4.4/HLK for kermit.misc@watsun); Wed, 7 Jun 1995 22:29:38 -0400
Newsgroups: comp.protocols.kermit.misc
Path: news.columbia.edu!panix!news.mathworks.com!uhog.mit.edu!bloom-beacon.mit.edu!spool.mu.edu!howland.reston.ans.net!news.sprintlink.net!noc.netcom.net!netcom.com!mkercher
From: mkercher@netcom.com (Matthew Kercher)
Subject: Re: Kermit as data-entry clerk
Message-Id: <mkercherD9s9p4.63J@netcom.com>
Keywords: kermit variables
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
References: <3r2avh$cdm@cmhcsys.cmhcsys.com>
Date: Wed, 7 Jun 1995 03:29:27 GMT
Lines: 36
Sender: mkercher@netcom16.netcom.com
Apparently-To: kermit.misc@watsun.cc.columbia.edu
chuck@cmhcsys.com (Chuck Stickelman) writes:
>I proposed that we output the data to a DOS file in a format Kermit
>would like: {field data }{more field data }{even more...} etc.
> define parse assign \%a \%1, assign \%b \%2, assign \%c \%3, ...
> open somefile.dat
> read \%z
> parse \%z
> output \%a
> output \%b
> output \%c
>However, the records in somefile.dat have too many fields (>35 in one
>instance) and I'm running out of both temporary and permanent variables.
>Charles A. Stickelman <chuck@cmhcsys.com>
I have a bunch of macros that I'll mail to you (too big to post here) which
take a line of text and parse it into named variables ($1 - $9). I'll also
send you some shift-left and shift-right macros which make manipulating
these variables easy. The problems that I've worked around are:
. MSK's \%1 - \%9 variables work great for most things, but the command
parser doesn't like to expand them at the end of definitions or
assignments (e.g., _assign $\m(x) works great, but _assign $\%1 doesn't
work for some reason having to do with the way the line is parsed).
. You only have 9 command line variables and no way to shift them down
easily. Read puts the entire line (record) into the variable \%z, but
getting at the fields past 9 has proven difficult (but solvable by
parsing, shifting, etc.)
-Matt (mkercher@netcom.com)
--
/-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-\
| Matt Kercher kercher@netcom.com |
+ Naval Aviation Depot (0413) (510) 263-6502 +
| Alameda, CA 94501-5008 |
+ Standard disclaimer-these thoughts are mine, thank you. +
\-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-=-+-/